--FFB Arcade Plugin--

Version 0.2

Created by Boomslangnz, Ducon2016 & Spazzy.

This is a plugin to provide Force Feedback and Rumble to various arcade games. Initially this was a small project
to add FFB to Daytona Championship USA and it grew from there to support several more games and rumble was added. 
While best efforts were made to try to resemble the real arcade force feedback, It will never be 100% accurate & 
in some cases eg Mario Kart GP DX, Pokken Tournament and Battle Gear 4. Effects were created entirely from scratch
so are not using any real force feedback values


--0.2 Changes--

- Added support for California Speed, Cruis'n World, Cruis'n USA & Off Road Challenge on Mame 32 or 64bit Binary OR MameUI64 ONLY for Mame 0.199.

- Added support for Sega Rally Championship,Daytona USA,Indy 500,Sega Touring Car Championship,Over Rev & Super GT 24h on M2 Emulator 1.1a (just alternative to built in FFB)
 (Disable FFB in Emulator.ini if you want to use FFB Plugin instead of M2 Emulator's built in FFB support. Set hardware type to STCC for OverRev & I/O board to A or B for Super GT 24h in test menu!! )

- Added support for Initial D4 Japan, Initial D5,Sonic & Sega All Stars Racing & Outrun 2 Special Tours Deluxe for Teknoparrot

- Added strength options in ini for most effects in Mario Kart 1.10. Wheels can only use MAX of 100, Controller can go higher
Multiplier option is if you want to raise the strength of Water and Drift effects, 200 would double the strength etc. Set to 100 by default

- Added option to certain games in ini to give a bit more strength to lower forces. FFBMode=0 is the standard and FFBMode=1 is the new mode 
(BE WARNED ON CERTAIN WHEELS THIS COULD CAUSE OSCILLATION TO OCCUR)

- Added option to Daytona Championship USA ini to hide mouse cursor

- Added AlternativeFFB option to ini which is for wheels such as PWM2M2 or certain direct drive wheels etc which use constant effect incorrectly ingame.
eg Roll left and Roll Right doesn't work correctly, Enable Alternative FFB to modify this and added strength options for it



--0.1a Changes--

- Added support for San Francisco Rush, San Francisco Rush The Rock, San Francisco Rush 2049,
San Francisco Rush 2049 SE & Rave Racer on Mame 32 or 64bit Binary OR MameUI64 ONLY for Mame 0.199.

 Please turn on Feedback steering in game settings on Rave Racer or you will not recieve FFB & I suggest you 
 adjust deadzone for your wheel in mame settings.

(This was added just for a little fun as no one really has done ffb on mame yet)

- Added Daytona Championship USA exit key (escape), Gear change added for Gears 1,2,3 & 4 or Sequential Gear Up/Down.
Change Button Number in ini if necessary (x360ce not necessary for gear change).
Make ShowButtonNumbersForSetup=1 if you want to have popup boxes to work out Button Layout. Press button to see box
Track selection menu & Name Entry has added control too now


- Modified Mario Kart DX 1.10 FFB adding a bunch of new effects and ini can now Enable or Disable Effects
- Will rumble when picking up coins
- Will rumble when picking up weapons
- Will rumble when using weapons
- Drift effect on rumble (stronger the more you turn)(rumble each way when turning etc)
- Boost effect on rumble
- Rumble when kart hits ground from jumps or flying
- Water effect on rumble (rumble each way when turning etc)
- Speed of kart taken into effect etc


--Credits--

- Reaver from Teknoparrot . Huge thanks to Reaver for supplying code necessary for some games & general force feedback,
extremely generous.

- Jackchen for his Daytona Championship USA FFB work at beginning of year.

- Howard Castro for help on game FFB code. Always helpful and a big reason this plugin was ever made

- Mame team

- Everyone who helps and gives back to this awesome scene. Thanks for everything!

--Supported Games--

-Afterburner Climax (Rumble only) [opengl32.dll into Teknoparrot folder]

-Battle Gear 4 Tuned (Japan version v2.07) [d3d9.dll into game exe folder]

-ChaseHQ 2 [d3d9.dll into game exe folder]

-Daytona USA [dinput8.dll into m2 emulator 1.1a folder]

-Daytona Championship USA (FFB modification by Jackchen required, Disable x360ce FFB!) [dinput8.dll into game exe folder]

-Ford Racing [dinput8.dll into game exe folder]

-Indy 500 [dinput8.dll into m2 emulator 1.1a folder]

-Initial D4 [opengl32.dll into Teknoparrot folder]

-Initial D4 Japan [opengl32.dll into Teknoparrot folder]

-Initial D5 [opengl32.dll into Teknoparrot folder]

-Initial D6 [dinput8.dll into game exe folder]

-Initial D7 [dinput8.dll into game exe folder]

-Initial D8 [dinput8.dll into game exe folder]

-Machstorm (Rumble only) [xinput1_3.dll into game exe folder]

-Mario Kart GP DX (Version 1.00 & version 1.10) [dinput8.dll into game exe folder]

-Pokken Tournament (Rumble only) [dinput8.dll into game exe folder]

-Sega Touring Car Championship [dinput8.dll into m2 emulator 1.1a folder]

-Sega Racing Classic [dinput8.dll into game exe folder]

-Sega Rally Championship [dinput8.dll into m2 emulator 1.1a folder]

-Sega Rally 3 [dinput8.dll into game exe folder]

-Super GT 24h [dinput8.dll into m2 emulator 1.1a folder]

-Sonic & Sega All Stars Racing [d3d9.dll into game exe folder]

-Outrun 2 Special Tours Deluxe [opengl32.dll into Teknoparrot folder]

-Over Rev [dinput8.dll into m2 emulator 1.1a folder]

-Wacky Races [d3d9.dll into game exe folder]

-Wangan Midnight Maximum Tune 5 (Update 5) [d3d11.dll into game exe folder]

-San Francisco Rush, San Francisco Rush The Rock, San Francisco Rush 2049 & San Francisco Rush 2049 SE 
(will ONLY work on either Mame Binary 32 or 64 bit or MameUI64 for Mame version 0.199 [dinput8.dll into any mame 0.199 folder]

-Rave Racer [dinput8.dll into any mame 0.199 folder]
TURN ON FEEDBACK STEERING IN GAME SETTINGS OR YOU WILL NOT RECIEVE FORCE FEEDBACK!
(will ONLY work on either Mame Binary 32 or 64 bit or MameUI64 for Mame version 0.199 [dinput8.dll into any mame 0.199 folder]

-California Speed
(will ONLY work on either Mame Binary 32 or 64 bit or MameUI64 for Mame version 0.199 [dinput8.dll into any mame 0.199 folder]

-Cruis'n World
(will ONLY work on either Mame Binary 32 or 64 bit or MameUI64 for Mame version 0.199 [dinput8.dll into any mame 0.199 folder]

-Cruis'n USA
(will ONLY work on either Mame Binary 32 or 64 bit or MameUI64 for Mame version 0.199 [dinput8.dll into any mame 0.199 folder]

-Off Road Challenge
(will ONLY work on either Mame Binary 32 or 64 bit or MameUI64 for Mame version 0.199 [dinput8.dll into any mame 0.199 folder]


--How to use--

Place the main dll file, SDL2.dll & FFBPlugin.ini into game folder for most games. For Teknoparrot Lindbergh 
games place opengl32.dll, SDL2.dll into Teknoparrot folder & FFBPlugin.ini into same folder as elf file for each game.

If you are using FFB Plugin on Teknoparrot instead of using Teknoparrot built in FFB, Please turn off Force Feedback in TeknoparrotUI.

ini file contains settings to adjust for each game

GameId= **GameId for code to identify game, also has a test FFB mode,-1 for Constant test ,-2 for
Sine test, -3 for Friction test, -4 for Spring test, -5 for Heavy test or -6 for loose test**

MinForce= **Minimum FFB force with 0 being lowest value available**

MaxForce= **Maximum FFB force with 100 being highest value available**

DeviceGUID= **Set Device GUID to connect to specific wheel or controller**

EnableRumble= **Turn Off (0) if your wheel supports rumble effect. For controllers, turn on (1)**

Logging= **Turn On (1) to allow log.txt to be made to log plugin. Device GUID is given in here**

ResetFeedback= **When a command is set that contradicts a prior command, clear the prior command. Should stay as 1**

FeedbackLength= **Length of a feedback command**

DefaultCentering= **If a game does not specify its own Centering force then a default centering can be applied here.
If a game has any of its own such forces,these values will be overwritten immediately in-game. Use -1 to disable**

DefaultFriction= **If a game does not specify its own Friction force then a default friction can be applied here.
If a game has any of its own such forces,these values will be overwritten immediately in-game. Use -1 to disable**

BeepWhenHook= **Beep should occur if dll is hooked by executable when turned on (1)**

FFBMode= **This will raise strength of lower forces, potentially could cause oscillation to occur on certain games. Set 1 to turn on**

AlternativeFFB= **This is for certain wheels where roll effect does not work correctly normally. Set 1 to turn on**